package com.jia.rpc.example.provider;


import com.jia.rpc.RpcApplication;
import com.jia.rpc.example.common.UserService;
import com.jia.rpc.registry.LocalRegistry;
import com.jia.rpc.server.HttpServer;
import com.jia.rpc.server.VertxHttpServer;

public class EasyProviderExample {
    public static void main(String[] args) {
        //RPC框架初始化
        RpcApplication.init();


        //注册服务
        LocalRegistry.register(UserService.class.getName(), UserServiceImpl.class);


        //启动web服务
        HttpServer vertxHttpServer = new VertxHttpServer();
        vertxHttpServer.doStart(RpcApplication.getRpcConfig().getServerPort());


    }
}
